/*
This file is part of Docking@Home.
http://docking.gcl.cis.udel.edu
Copyright (C) 2009 University of Delaware

Docking@Home is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Docking@Home is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Docking@Home.  If not, see <http://www.gnu.org/licenses/>.
*/
/*
	Filename: ImageButton.h
	Description: A button in the UI that is represented by an image
	Revision History: 
		Created - 01/08/08
	Author: Robert Keller (01/08/08 -> current)
*/

#ifndef _ImageButton_h
#define _ImageButton_h

#include "Button.h"

#include "gutil.h"

#define BUTTONIMAGE_MAX_FILE_PATH_LENGTH 256

class ImageButton : public Button
{
public:

	// Constructor / Destructor

	ImageButton();
	ImageButton(const char n[25]);
	ImageButton(const char n[25], float xVal, float yVal);
	ImageButton(const char n[25], float xVal, float yVal, float w, float h);
	~ImageButton();

	// Initialization Functions

	void init (const char n[BUTTON_MAX_NAME_LENGTH], float xVal, float yVal, float w, float h);

	// Member Modifiers

	void loadImage (const char path [BUTTONIMAGE_MAX_FILE_PATH_LENGTH]);

	// Required Button Functions 

	bool determineState (int x, int y, int clicked);
	
	void resize (float scaleX, float scaleY);
	void resizeSameBottom (float scaleX, float scaleY,
		int standardHeight, int windowHeight);
	void resizeSameLeft (float scaleX, float scaleY,
		int standardWidth, int windowWidth);

	void draw ();
	void drawSelected ();
	void drawUnselected ();
	void drawHovered ();

private:
	

	// Image for button

	TEXTURE_DESC image;

};

#endif 
